interface Shape {
    double area(double x) ;
}

class Square implements Shape {

    @Override
    public double area(double x) {
        return x * x;
    }
}

class Cirle implements Shape {

    @Override
    public double area(double x) {
        return 3.14159265358979323846 * (x * x);
    }
}

public class Example03 {
    public static void main(String[] args) {
        Square square = new Square();
        Cirle circle = new Cirle();
        System.out.println("边长为2的正方形面积为：" + square.area(2.0));
        System.out.println("半径为3的圆面积为：" + circle.area(3.0));
    }
}